Track direct window cairo access and avoid tricks when used
authorAlexander Larsson <alexl@redhat.com>
Tue, 19 Jan 2010 13:44:52 +0000 (14:44 +0100)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sun, 4 Apr 2010 00:55:21 +0000 (20:55 -0400)
commite9da5b95dec6dc055a0a9e93290d1cf4770aa2a3
treef2b938c1f475fb81f1d10194f0cf66652a25cb8f
parent4aa4093b6e181312eae0918e5164ef65ce93f2b9
Track direct window cairo access and avoid tricks when used

When a cairo surface is requested for direct window access (i.e. not
when double-buffering) we can't really track when the actual drawing happens
as cairo drawing is not virtualized. This means we can't properly flush
any outstanding window moves or implicit paints.

This actually causes problems with e.g. abiword (bug #606009) where they
draw without double-buffering. If you press down it scrolls the window
and then draws the caret, but the caret drawing does not flush the
outstanding move from the scroll, so the caret gets drawn on the wrong
screen.

We fix this by never allowing either implicit paints or outstanding window
moves on impl-windows where any windows related to it has an outstanding
direct cairo surface. Luckily this is not very common so in practice this
doesn't matter much.
gdk/gdkinternals.h
gdk/gdkwindow.c